package tgc.rj.zz.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.rj.zz.custom.CommonService;
import tgc.rj.zz.entity.Tbdept;
import tgc.rj.zz.repository.DeptRepository;

@Service
public class DeptService extends CommonService<Tbdept, Integer>{

	@Autowired
	private DeptRepository deptDAO;
	
	public List<Tbdept> findByParentIsNull() {
		
		return deptDAO.findByParentIsNull();
	}

	public List<Tbdept> findByParentId(Integer id) {
		
		return deptDAO.findByParentId(id);
	}

}
